<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>限时获取金币</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
    <style>
        html{
          background: rgba(0,0,0,0.5);
        }
        body{
          background: rgba(0,0,0,0);
        }
        img{
          max-width: 100%;
        }
        .head{
          position: relative;
          height:70px;
          line-height: 70px;
          width:100%;
          text-align: center;;
          color:#333;
          font-size: 24px;
          background: #FFED4A;
        }
        .close{
          position: absolute;
          width:50px;
          height:70px;
          line-height: 70px;
          text-align: center;
          right:0;
          top:0;
        }
        .close img{
          width:20px;
          height:20px;
          vertical-align: middle;
          position: relative;
          top:-2px;
        }
        .mask{
          position: fixed;
          z-index: -1;
          top:0;
          bottom:0;
          left:0;
          right:0;
        }
        .body{
          width:90%;
          margin-top: 100px;
          margin-left: 5%;
          border-radius: 15px;
          overflow: hidden;
        }
        .rl{
          font-size: 14px;
        }
        .box{
          background: #fff;
          min-height: 150px;
          text-align: center;
        }
    </style>
</head>

<body>
  <div class="mask" id="mask"></div>
  <div class="body">
    <div class="head">
      限时获取金币
      <div class="close closed" id="close">
        <img src="../image/delete-b.png" alt="">
      </div>
    </div>
    <div class="box">
      金币
    </div>
  </div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript">
    apiready = function() {
      $api.addEvt($api.byId('close'), 'click', function() {
        api.sendEvent({
          name: 'details',
          extra: {
            key: 'getgold',
          }
        });
        api.closeFrame({
          name: 'getgold'
        });
      });
      $api.addEvt($api.byId('mask'), 'click', function() {
        api.sendEvent({
          name: 'details',
          extra: {
            key: 'getgold',
          }
        });
        api.closeFrame({
          name: 'getgold'
        });
    });
    // alert($api.getStorage('user'));
  }
</script>

</html>
